<?php
$user = $_POST['user'];
$admin = $_POST['admin'];
$conn = new mysqli("localhost", "root", "", "simple_weibo");
$conn->query("set names 'utf8'");

$sql = "insert into weibo_relation(user, fans) values ('".$user."', '".$admin."')";
$res = $conn->query($sql);

if($res){
    echo "关注成功";
}else {
    echo "关注失败";
}